package top.byfree.jbyan.saber.bean.vo

import com.fasterxml.jackson.annotation.JsonFormat
import top.byfree.jbyan.saber.bean.Users
import top.byfree.jbyan.saber.common.excel.SaberExcel
import java.time.LocalDateTime

/**
 * 用户视图实体
 *
 * @author jbyan
 * @since 21/3/2024
 */
data class UserVo(
    @field:SaberExcel("用户编号")
    var userId: String,
    @field:SaberExcel("头像")
    var avatar: String,
    @field:SaberExcel("用户名称")
    var username: String,
    @field:SaberExcel("用户昵称")
    var nickname: String,
    @field:SaberExcel("用户签名")
    var sign: String,
    @field:SaberExcel("邮箱")
    var email: String,
    @field:SaberExcel("状态")
    var status: Int,
    @field:SaberExcel("创建日期")
    @field:JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    var gmtCreate: LocalDateTime,
    @field:SaberExcel("修改日期")
    @field:JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    var gmtModify: LocalDateTime,
    @field:SaberExcel("创建人")
    var createBy: String,
    @field:SaberExcel("修改人")
    var modifyBy: String,
)

val userVoCol = listOf(
    Users.userId,
    Users.avatar,
    Users.username,
    Users.nickname,
    Users.sign,
    Users.email,
    Users.gmtCreate,
    Users.gmtModify,
    Users.createBy,
    Users.modifyBy
)